
package com.jf.cloud.multishop.service;

import com.jf.cloud.multishop.dto.ShopBankCardDTO;
import com.jf.cloud.multishop.vo.ShopBankCardVO;

import java.util.List;

/**
 * @author zz
 * @Date 2021/4/25 17:02
 */
public interface ShopBankCardService {
    /**
     * 批量新增结算银行账户
     * @param shopBankCardDTOList
     * @param shopId
     */
    void insertBatch(List<ShopBankCardDTO> shopBankCardDTOList, Long shopId);

    /**
     * 根据店铺id获取银行卡列表
     * @param shopId
     * @return
     */
    List<ShopBankCardVO> listByShopId(Long shopId);

    /**
     * 根据银行卡id删除银行卡信息
     * @param shopBankCardId
     * @param shopId
     */
    void deleteByShopBankCardId(Long shopBankCardId, Long shopId);

    /**
     * 批量新增结算银行账户并提交开店申请
     * @param shopBankCardDTOList
     * @param shopId
     */
    void insertBatchAndSubmitApply(List<ShopBankCardDTO> shopBankCardDTOList, Long shopId);

    /**
     * 更新店铺银行卡信息
     * @param shopBankCardDTO 银行卡信息
     * @param shopId 店铺id
     */
    void updateByShopId(ShopBankCardDTO shopBankCardDTO, Long shopId);

    /**
     * 设置银行卡为主账号
     * @param shopBankCardId
     * @param shopId
     */
    void setPrimaryByShopId(Long shopBankCardId, Long shopId);

    /**
     * 设置银行卡不为主账号
     * @param shopBankCardId
     * @param shopId
     */
    void setNotPrimaryByShopId(Long shopBankCardId, Long shopId);

    /**
     * 保存单个银行卡信息
     * @param shopBankCardDTO
     * @param shopId
     */
    void insertByShopId(ShopBankCardDTO shopBankCardDTO, Long shopId);

    /**
     * 根据银行卡id获取银行卡信息
     * @param shopBankCardId
     * @return
     */
    ShopBankCardVO getByShopBankCardId(Long shopBankCardId);

    /**
     * 根据银行卡id与店铺id获取银行卡信息
     * @param shopBankCardId
     * @param shopId
     * @return
     */
    ShopBankCardVO getByShopBankCardIdAndShopId(Long shopBankCardId, Long shopId);
}
